const Koa = require('koa')
const bodyParser = require('koa-bodyparser')
const cors = require('koa-cors')
const logger = require('koa-logger')
const router = require('./router')

const app = new Koa()

app.use(cors())
app.use(logger())
app.use(bodyParser())
router(app)

app.listen(3000, () => {
    console.log('server is running at port 3000')
})